package com.ggk911.pharmacy_system.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ggk911.pharmacy_system.entity.DTO.DrugSaleInfoDTO;
import com.ggk911.pharmacy_system.entity.DrugSaleInfo;
import com.ggk911.pharmacy_system.mapper.DrugSaleInfoMapper;
import com.ggk911.pharmacy_system.service.IDrugSaleInfoService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ggk-911
 * @version 1.0 2023/4/13 12:45
 */
@Service
public class DrugSaleInfoServiceImpl extends ServiceImpl<DrugSaleInfoMapper, DrugSaleInfo> implements IDrugSaleInfoService {
    /**
     * pageAdAd
     *
     * @param page
     * @param queryWrapper
     * @param <E>
     * @return
     */
    public <E extends IPage<DrugSaleInfo>> E pageAdAd(E page, Wrapper<DrugSaleInfo> queryWrapper) {
        return baseMapper.selectPageAdAd(page, queryWrapper);
    }

    /**
     *
     * @return
     */
    public List<DrugSaleInfoDTO> selectCountByDrugInfoType(){
        return baseMapper.selectCountByDrugInfoType();
    }
}
